
from pyecharts.charts import Arc
from pyecharts import options as opts

# 弧线图的数据
arc_data = [
    opts.ArcItem(name="分类A", value=100),
    opts.ArcItem(name="分类B", value=200),
    opts.ArItem(name="分类C", value=150),
]

# 创建弧线图
arc = Arc()

# 添加数据到弧线图
arc.add_xaxis(arc_data[:-1].column_name)
arc.add_yaxis("系列A", arc_data[:-1].values)

# 设置全局配置项
arc.set_global_opts(
    title_opts=opts.TitleOpts(title="弧线图示例"),
    legend_opts=opts.LegendOpts()
)

# 渲染图表到HTML文件
arc.render(path="arc_chart.html")